var contextPath = $("#contextPath").val();
 var ul=$("#divEXP");
 html='';
 $(function(){
	var orderId = $("#orderId").val();
	$.ajax({
		url:contextPath+"/courier/details",
		dataType:"json",
		type:"post",
		data:{orderId:orderId},
		success : function(data) {
			if(data.result.state == 1){
				 html+='<div class="mod_transport_info bgwh"><p><span class="g9">物流编号：</span>'+data.courier.logisticCode+'</p>    <p><span class="g9">物流公司：</span>'+data.courier.courierName+'</p> </div> ';
				 html+=' <ul class="bgwh mod_transport_stream"> ';
				 if(data.courier.state=='3'){ //3:已经签收
					  $.each(data.courier.tracesList,function(i,v){	
						html+=' <li class="mod_transport_item"> <dl class="order_transport_info"> <dt>'+v.acceptStation+' </dt><dd class="g9">'+v.acceptTime+'</dd></dl></li> ';
					  });
				 }else if(data.courier.state=='4') {  // 4:问题件( N 种情况 )
 					    html +='<ul class="bgwh mod_transport_stream">';
						html +='<li class="mod_transport_item"><dl class="order_transport_info"><dt>物流信息暂无！</dt></dl></li> ';
						html +=' </ul>';
				 }else{    // 2: 在途中			 
					 $.each(data.courier.tracesList,function(i,v){
						 html+=' <li class="mod_transport_item"> <dl class="order_transport_info"> <dt>'+v.acceptStation+' </dt><dd class="g9">'+v.acceptTime+'</dd></dl></li> ';
							});
				 }
			 }else{
				 if(data.state=='5'){
	  				 html +='<ul class="bgwh mod_transport_stream">';
					 html +='<li class="mod_transport_item"><dl class="order_transport_info"><dt>'+data.result.message+'！</dt></dl></li> ';
					 html +=' </ul>';
				 }else if(data.state == "6"){  //等待揽收
					 if(data.courier.logisticCode==null && data.courier.courierName==null){
	                  html+='<div class="mod_transport_info bgwh"><p><span class="g9">物流编号：</span>暂无</p>    <p><span class="g9">物流公司：</span>暂无</p> </div> ';
					 }
					 html +='<ul class="bgwh mod_transport_stream">';
					 html +='<li class="mod_transport_item"><dl class="order_transport_info"><dt>'+data.result.message+'！</dt></dl></li> ';
					 html +=' </ul>';
				 }else{
					 html +='<ul class="bgwh mod_transport_stream">';
					 html +='<li class="mod_transport_item"><dl class="order_transport_info"><dt>物流信息暂无！</dt></dl></li> ';
					 html +=' </ul>';
				 }
			 }
			 html+=' </ul> ';
			ul.append(html);
		},error : function(XMLHttpRequest, textStatus, errorThrown){

		}		
	});
})